package com.yjq.client;

import javax.swing.*;
import java.awt.*;

/**
 * @author liuzhihao
 * @create 2021-12-20 0:58
 * 绘制图形的
 */
public class Control extends JPanel {

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);

        int width = this.getWidth();
        int height = this.getHeight();

        g.setColor(new Color(255,255,255));
        g.fillRect(50, 400, width, height );

        g.setColor(Color.RED);
        g.fillRect(50,400, 50, 100);

    }
}
